<?php

class Navbar extends MX_Controller
{
    function __construct()
    {
        parent::__construct();
        $this->lang->load('error', $this->public_model->getLanguage());
    }

    function frontback()
    {
            
        $data = array();
        $data['navbar'] = $this->public_model->getNavbar(array('enable'=>ENABLED));
        $this->load->view('navbar_frontback_view', $data);   
    }
    
    function view($navbar_id = null)
    {
        if ($navbar_id == null)
        {
            echo Modules::run('common/error_404');
        }
        else
        {
            $data = array();
            $data['navbars'] = $this->public_model->getNavbarContent(null, $navbar_id);
            $content = $this->load->view('list_view', $data, true);
            Template::display($content);
        }
    }
    
   

}
